#include <QCoreApplication>
#include <QDebug>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    QList<int> list;
    QMutableListIterator<int> i(list);

    for(int j = 0; j < 10; ++j)
    {
        i.insert(j);
    }

    for(i.toFront();i.hasNext();)
    {
        qDebug() << i.next();
    }

    for(i.toBack();i.hasPrevious();)
    {
        qDebug()<< i.previous();
#if 0
        if(i.previous() %2 == 0)
        {
            i.remove();
        }
        else
        {
            i.setValue(i.peekNext() * 10);
        }
#endif
    }

    for(i.toFront();i.hasNext();)
    {
      //  qDebug()<< i.next();
    }

    return a.exec();
}
